]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
audioDeviceSelection: Adapt to new dialog design
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 27 Jan 2020 21:30:12 +0000 (22:30 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 27 Jan 2020 22:40:04 +0000 (23:40 +0100)
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/962

data/theme/gnome-shell-sass/widgets/_dialogs.scss
js/ui/audioDeviceSelection.js

index ce85c0ea0544c2f146396730e2f90bb4ec69d102..aeb0e46b74391bd788657ddb8026141125b53116 100644 (file)
 
 /* Audio selection dialog */
 .audio-device-selection-dialog {
-  spacing: 30px;
-}
-
-.audio-selection-content {
-  spacing: 20px;
-  padding: 24px;
-}
-
-.audio-selection-title {
-  font-weight: bold;
-  text-align: center;
-}
-
-.audio-selection-box {
-  spacing: 20px;
+  .modal-dialog-content-box { margin-bottom: 28px; }
+  .audio-selection-box { spacing: 20px; }
 }
 
 .audio-selection-device {
index ab0f9f594e2c24b19e2da205c9e905311eef4319..9bdabc225bdc1d601ba480de0fba0bbd052c48c5 100644 (file)
@@ -1,6 +1,7 @@
 /* exported AudioDeviceSelectionDBus */
 const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
 
+const Dialog = imports.ui.dialog;
 const Main = imports.ui.main;
 const ModalDialog = imports.ui.modalDialog;
 
@@ -36,18 +37,17 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
     }
 
     _buildLayout() {
-        let title = new St.Label({ style_class: 'audio-selection-title',
-                                   text: _("Select Audio Device"),
-                                   x_align: Clutter.ActorAlign.CENTER });
-
-        this.contentLayout.style_class = 'audio-selection-content';
-        this.contentLayout.add(title);
+        let content = new Dialog.MessageDialogContent({
+            title: _('Select Audio Device'),
+        });
 
         this._selectionBox = new St.BoxLayout({
             style_class: 'audio-selection-box',
             x_expand: true,
         });
-        this.contentLayout.add_child(this._selectionBox);
+        content.add_child(this._selectionBox);
+
+        this.contentLayout.add_child(content);
 
         if (Main.sessionMode.allowSettings) {
             this.addButton({ action: this._openSettings.bind(this),